package org.ccay.core.log;

import java.lang.reflect.Method;
import java.util.Date;

import org.ccay.core.expression.InvocationContext;

/**
 * 审计上下文。
 * <BR>
 * 通过审计上下文可以获取审计操作发生时的现场信息。
 * 
 * Created：2011-9-19
 * @author chaowangbang
 * @version:
 */
public class AuditContext extends InvocationContext{
	
	/** 方法开始时间 * */
	private Date startDate;

	/** 方法 结束时间 * */
	private Date endDate;
	
	/** 调用者 **/
	private Long userId;
	
	/** 调用者的IP **/
	private String userIP;
	
	/** 调用者的服务器名称 **/
	private String serverName;
	
	/** 调用者的当前维度 **/
	private String dimension;
	
	
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	/**
	 * 构造函数
	 * 
	 * @param caller
	 * @param target
	 * @param method
	 * @param parameterValues
	 */
	public AuditContext(Object target, Method method, Object[] parameterValues) {
		super(target, method, parameterValues);
	}

	
	public String getCurrentUserIP() {
		return this.userIP;
	}
	
	public void setCurrentUserIP(String userIP) {
		this.userIP = userIP;
	}

	public String getServerName() {
		return serverName;
	}

	public void setServerName(String serverName) {
		this.serverName = serverName;
	}

	public String getDimension() {
		return dimension;
	}

	public void setDimension(String dimension) {
		this.dimension = dimension;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}
}